package user_api

import (
	"github.com/gin-gonic/gin"
	"muziai-server/models"
	"muziai-server/service/user_service"
	"muziai-server/utils/res"
)

func (u UserApi) AdminLoginLoseView(c *gin.Context) {
	var cr models.IDRequest

	err := c.ShouldBindJSON(&cr)
	if err != nil {
		res.FailWithError(c, err)
		return
	}
	err = u.UserService.UserLoginLose(user_service.UserLoginLoseOptions{
		ID: cr.ID,
	})
	if err != nil {
		res.FailWithError(c, err)
		return
	}
	res.OkWithMsg(c, "当前登录设备已失效")

}
